package de.reichelt.fxrequi.data;

import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

public class Role {
  private final StringProperty name = new SimpleStringProperty();
  private final StringProperty title = new SimpleStringProperty();
  private final BooleanProperty admin = new SimpleBooleanProperty();
  private final BooleanProperty projects = new SimpleBooleanProperty();
  private final BooleanProperty requirements = new SimpleBooleanProperty();
  private final BooleanProperty testplanning = new SimpleBooleanProperty();
  private final BooleanProperty testrun = new SimpleBooleanProperty();
  private final BooleanProperty reports = new SimpleBooleanProperty();

  public Role() {
  }

  public Role(String name, String title, Boolean admin, Boolean projects, 
          Boolean requirements, Boolean testplanning, Boolean testrun, Boolean reports) {
    setName(name);
    setTitle(title);
    setAdmin(admin);
    setProjects(projects);
    setRequirements(requirements);
    setTestplanning(testplanning);
    setTestrun(testrun);
    setReports(reports);
  }
  
  
  public String getName() {
    return name.get();
  }

  public void setName(String value) {
    name.set(value);
  }

  public StringProperty nameProperty() {
    return name;
  }
  
  public String getTitle() {
    return title.get();
  }

  public void setTitle(String value) {
    title.set(value);
  }

  public StringProperty titleProperty() {
    return title;
  }
  
  public boolean isAdmin() {
    return admin.get();
  }

  public void setAdmin(boolean value) {
    admin.set(value);
  }

  public BooleanProperty adminProperty() {
    return admin;
  }
  
  public boolean isProjects() {
    return projects.get();
  }

  public void setProjects(boolean value) {
    projects.set(value);
  }

  public BooleanProperty projectsProperty() {
    return projects;
  }
  
  public boolean isRequirements() {
    return requirements.get();
  }

  public void setRequirements(boolean value) {
    requirements.set(value);
  }

  public BooleanProperty requirementsProperty() {
    return requirements;
  }
  
  public boolean isTestplanning() {
    return testplanning.get();
  }

  public void setTestplanning(boolean value) {
    testplanning.set(value);
  }

  public BooleanProperty testplanningProperty() {
    return testplanning;
  }
  
  public boolean isTestrun() {
    return testrun.get();
  }

  public void setTestrun(boolean value) {
    testrun.set(value);
  }

  public BooleanProperty testrunProperty() {
    return testrun;
  }
  
  public boolean isReports() {
    return reports.get();
  }

  public void setReports(boolean value) {
    reports.set(value);
  }

  public BooleanProperty reportsProperty() {
    return reports;
  }

  @Override
  public String toString() {
    return title.get();
  }
  
  

}
